package com.jike.noobmoney.mvp.view.activity;


import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.jike.noobmoney.R;
import com.jike.noobmoney.adapter.NewListAdapter;
import com.jike.noobmoney.contants.ConstantValue;
import com.jike.noobmoney.entity.NewEntity;
import com.jike.noobmoney.entity.TaskListEntity;
import com.jike.noobmoney.mvp.presenter.TaskPresenter;
import com.jike.noobmoney.net.IView;
import com.jike.noobmoney.util.SPUtils;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by kekex on 2019/4/13
 * 详情
 */

public class NewDetailActivity extends BaseActivity{

    @BindView(R.id.tv_title)
    TextView tvTitle;

    @BindView(R.id.tv_title_top)
    TextView tv_title_top;

    @BindView(R.id.tv_time)
    TextView tv_time;

    @BindView(R.id.tv_content)
    TextView tv_content;



    private TaskPresenter taskPresenter;
    private List<NewEntity.MessageBean> mData = new ArrayList<>();
    private String userid;


    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected int layoutResID() {
        return R.layout.activity_new_detail_layout;
    }
    @Override
    public boolean ismain() {
        return true;
    }
    @Override
    public Boolean isfits() {
        return true;
    }
    @Override
    protected void initData() {
        //官方推荐 改 热门任务
        tvTitle.setText("公告详情");


        userid = SPUtils.getInstance().getString(ConstantValue.SpType.userid);
        NewEntity.MessageBean bean=(NewEntity.MessageBean)getIntent().getSerializableExtra("model");
        tv_title_top.setText(bean.getTitle());

        tv_time.setText(bean.getCreatetime());

        tv_content.setText(bean.getText());
    }

    /**
     *
     */



    @OnClick({R.id.iv_back, R.id.tv_right})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.iv_back:
                finish();
                break;
            case R.id.tv_right:
                //startActivity(new Intent(context, GuizeActivity.class));
                break;
        }
    }

}
